home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / yerk / mps231ss.hqx / Mops source / Toolbox classes / Gestalt < prev    next >
Text File  |  1993-02-02  |  692b  |  26 lines

  1. \ Gestalt and Sysenvirons
  2. \ Initial version - mrh  Aug 90.
  3. \ Sept 91    SysEnvirons stuff deleted.
  4.  
  5.  
  6. :code  (GEST)    \ ( selector -- result rc )
  7.     pop    d0
  8.     call    Gestalt
  9.     push    a0
  10.     ext.l    d0
  11.     push    d0
  12. ;code
  13.  
  14. : GESTALT
  15.     (gest)  abort" Gestalt call failed"  ;
  16.  
  17. \ The following code is really only for testing, and as an example.  Note that Apple urges caution in checking the machine type, since it's usually better to ask about specific facilities your program needs, rather than infer it from the machine type.
  18.  
  19. type{    x Classic MacXL Mac512KE MacPlus MacSE
  20.     MacII MacIIx MacIIcx MacSE/30 MacPortable MacIIci MacIIfx
  21.     Mac#13 Mac#14 Mac#15 Mac#16 Mac#17 MacIIsi  }
  22.  
  23.  
  24. : MACHINETYPE
  25.     'type mach  Gestalt  ;
  26.